package com.pqtest.api.controller;

import com.pqtest.api.annotation.ResponseFormat;
import com.pqtest.api.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@EnableCaching
public class HomeController{
    @Autowired
    private StringRedisTemplate stringRedisTemplate;

    @Autowired
    private UserService userService;

    @GetMapping("/")
    @ResponseFormat(type = "withMsg")
    Object hello(){
        //stringRedisTemplate.opsForValue().set("lake","haha");
        return "hello";
        //return userService.getList();
    }
}